Skip to content

Udev fixes#9

Open
vidvidex wants to merge 13 commits into
ros2from
udev_fixes
Open

Udev fixes#9
vidvidex wants to merge 13 commits into
ros2from
udev_fixes

Conversation

@vidvidex
Copy link
Copy Markdown
Collaborator

@vidvidex vidvidex commented Jun 1, 2026

Changes:

  • cherry-pick commits for udev rules from main
  • fix owner of devices (user instead of hostname)
  • fix some typos
  • change menu structure for adding rules

On top level it now asks whether you want to add from a rules file or from currently connected devices (previously it asked if you have MRS distribution board and then always also asked about the connected devices)

image

For either option it then asks whether you want to create a new file with this rule or append to an existing file.

@vidvidex vidvidex changed the title WIP: Udev fixes Udev fixes Jun 1, 2026
@vidvidex vidvidex requested a review from Copilot June 1, 2026 15:03
Copy link
Copy Markdown

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

This PR refactors the udev-rule setup flow by replacing the older “setup new file / add to existing file” scripts with two clearer entry points (add from an existing rules template vs. generate from currently connected devices) and centralizing shared whiptail/udev helpers.

Changes:

  • Add shared helper library (udev_rules_common.sh) and new menu-driven scripts for adding rules from templates or connected devices.
  • Update/add udev rule templates (including owner placeholder usage) and remove legacy scripts.

Reviewed changes

Copilot reviewed 7 out of 7 changed files in this pull request and generated 2 comments.

Show a summary per file
File Description
subscripts/5Udev_rules/DISREGARD_udev_rules/X500.rules Updates template rule matching (USB interface numbers) for X500 distribution board devices.
subscripts/5Udev_rules/DISREGARD_udev_rules/robocore.rules Adds a template rules file for robocore (ttyTHS0) mapping.
subscripts/5Udev_rules/DISREGARD_common/udev_rules_common.sh Introduces shared whiptail/menu helpers and udevadm parsing utilities used by the new scripts.
subscripts/5Udev_rules/2Add_udev_rules_to_an_existing_file.sh Removes legacy “add to existing file” implementation in favor of the new flow.
subscripts/5Udev_rules/2Add_from_currently_connected_devices.sh Adds new flow for generating rules from connected devices and writing/appending to a selected target file.
subscripts/5Udev_rules/1Setup_new_udev_rules_file.sh Removes legacy “setup new rules file” implementation in favor of the new flow.
subscripts/5Udev_rules/1Add_from_existing_rules_file.sh Adds new flow for selecting a template rules file and writing/appending it to a target file.

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

Comment thread subscripts/5Udev_rules/2Add_from_currently_connected_devices.sh Outdated
Comment thread subscripts/5Udev_rules/2Add_from_currently_connected_devices.sh Outdated
vidvidex and others added 3 commits June 1, 2026 17:08
Co-authored-by: Copilot Autofix powered by AI <175728472+Copilot@users.noreply.github.com>
@vidvidex vidvidex requested a review from Copilot June 2, 2026 09:56
Copy link
Copy Markdown

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Copilot was unable to review this pull request because the user who requested the review has reached their quota limit.

@vidvidex
Copy link
Copy Markdown
Collaborator Author

vidvidex commented Jun 2, 2026

New version:

image

New flow for adding rules:

  1. Ask if user has a MRS distribution board, if yes they can select which, else continue
  2. Ask if user wants to add rules for devices detected on /dev/tty. If yes for each device ask for symlink name (same as before)
  3. Ask where to store these rules. Either to a new file or append to existing file
  4. If user selected "New file" but that file already exists, the script asks if they want to overwrite or not

# RULES for X500 Distribution Board
# Pixhawk
SUBSYSTEM=="tty", ATTRS{idVendor}=="0403", ATTRS{idProduct}=="6011", ENV{ID_USB_INTERFACE_NUM}=="03", SYMLINK+="pixhawk",OWNER="TO_BE_REPLACED",MODE="0666"
SUBSYSTEM=="tty", ATTRS{idVendor}=="0403", ATTRS{idProduct}=="6011", ENV{ID_USB_INTERFACE_NUM}=="02", SYMLINK+="pixhawk",OWNER="TO_BE_REPLACED",MODE="0666"
Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Why did you change this?

Copy link
Copy Markdown
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Cherry-picked this commit from main: a27e377

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants